package net.sunofbeach.blog;

import com.google.gson.Gson;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import java.util.Random;

/**
 * @author bing_  @create 2021/11/23-21:12
 */
@SpringBootApplication
public class BlogApplication {

    public static void main(String[] args) {
        SpringApplication.run(BlogApplication.class, args);
    }

    /**
     * 生成随机数
     *
     * @return
     */
    @Bean
    public Random createRandom() {
        return new Random();
    }

    /**
     * 拷贝对象
     *
     * @return
     */
    @Bean
    public Gson createGson() {
        return new Gson();
    }

}